package master.system.organization;

import master.support.DAOSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author <a href="mailto:jfox.young@gmail.com">Young Yang</a>
 */
@Service
public class OrganizationService {

    @Autowired
    DAOSupport daoSupport;

    public Company getCompany(){
        return daoSupport.getDomainObject(Company.class, 0);
    }

    public void updateCompany(Company company){
        daoSupport.updateDomainObject(company);
    }

    public List<Department> getDepartments(){
        return daoSupport.selectAllDomainObjects(Department.class);
    }

    public static void main(String[] args) {

    }
}
